<?php print '<'. $options['tag_name'] .' '. implode(' ', $attributes) .'>'; ?>

<?php if (!empty($root_value)) :?>
  <?php print $root_value ?>
<?php else : ?>
<?php foreach ($tags as $key => $tag) : ?>
  <?php if (!empty($tag['label'])) print '<'. $tag['label'] .' '. implode(' ', $tag['attributes']) .'>'. $tag['value'] .'</'. $tag['label'] .'>'; ?>
<?php endforeach ?>
<?php endif ?>
<?php print '</'. $options['tag_name'] .'>'?>

